<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    #app{
        width: 600px;
        margin: 40px auto;
    }
    button{
        margin-top: 15px;
    }
</style>
<body>
    <script src="/js/vue.js"></script>
    <div id ="app">
       <h2>信息统计</h2>
       <from>
        <label>
            性别：
            <my-radio name="gender" value="0">男</my-radio>
            <my-radio name="gender" value="1">女</my-radio>
        </label>
        <div>
            <button>提交</button>
        </div>
       </from>
    </div>
    
    <script type="text/x-template" id="my-radio">
        <label>
            <input type="radio" :name="name" :value="value">
            <slot></slot>
        </label>
    </script>
    <script>
        Vue.component('my-radio',{
            template:'#my-radio',
            props:['name','value']
        })
       let app =new Vue({
         el:"#app",
       })

       
    </script>  
</body>
</html>